import service from '@/utils/request'

export const optionList = (params) => {
  return service({
    url: '/manager/maintain/check/option',
    method: 'get',
    params
  })
}

export const optionEdit = (data) => {
  return service({
    url: '/manager/maintain/check/option/edit',
    method: 'post',
    data
  })
}

export const deleteOption = (id) => {
  return service({
    url: `/manager/maintain/check/option/delete/${id}`,
    method: 'post'
  })
}

export const optionAdd = (data) => {
  return service({
    url: '/manager/maintain/check/option/add',
    method: 'post',
    data
  })
}

export const patrolTask = (params) => {
  return service({
    url: '/manager/maintain/patrol/task',
    method: 'get',
    params
  })
}

export const taskEdit = (data) => {
  return service({
    url: '/manager/maintain/patrol/task/edit',
    method: 'post',
    data
  })
}

export const taskDelete = (id) => {
  return service({
    url: `/manager/maintain/patrol/task/delete/${id}`,
    method: 'post'
  })
}

export const taskAdd = (data) => {
  return service({
    url: '/manager/maintain/patrol/task/add',
    method: 'post',
    data
  })
}

export const patrolTaskUnit = (params) => {
  return service({
    url: '/client/maintain/patrol/task/unit',
    method: 'get',
    params
  })
}

export const clientPatrolTask = (params) => {
  return service({
    url: '/client/maintain/patrol/task',
    method: 'get',
    params
  })
}

export const taskUnitReport = (data) => {
  return service({
    url: '/client/maintain/patrol/task/unit/report',
    method: 'post',
    data
  })
}

export const taskUnitFile = (params) => {
  return service({
    url: '/manager/maintain/patrol/task/unit/file',
    method: 'get',
    params
  })
}

export const managerTaskUnit = (params) => {
  return service({
    url: '/manager/maintain/patrol/task/unit',
    method: 'get',
    params
  })
}

export const clientUnitFile = (params) => {
  return service({
    url: '/client/maintain/patrol/task/unit/file',
    method: 'get',
    params
  })
}

export const declareMediumPlan = (params) => {
  return service({
    url: '/manager/maintain/declare/medium/plan',
    method: 'get',
    params
  })
}

export const declareMediumApply = (data) => {
  return service({
    url: '/client/maintain/declare/medium/apply',
    method: 'post',
    data
  })
}

export const declareMedium = (params) => {
  return service({
    url: '/client/maintain/declare/medium',
    method: 'get',
    params
  })
}

export const declareMediumFile = (id) => {
  return service({
    url: `/manager/maintain/declare/medium/file/${id}`,
    method: 'get',
  })
}

export const declareMediumDetail = (id) => {
  return service({
    url: `/manager/maintain/declare/medium/detail/${id}`,
    method: 'get',
  })
}

export const maintainDeclareMedium = (params) => {
  return service({
    url: '/manager/maintain/declare/medium',
    method: 'get',
    params
  })
}

export const declareMediumExamine = (data) => {
  return service({
    url: '/manager/maintain/declare/medium/examine',
    method: 'post',
    data
  })
}

export const declareMediumConstruction = (id) => {
  return service({
    url: `/client/maintain/declare/medium/construction/${id}`,
    method: 'get',
  })
}

export const mediumListConstruction = (params) => {
  return service({
    url: '/client/maintain/declare/medium/list/construction',
    method: 'get',
    params
  })
}

export const mediumChangeConstruction = (data) => {
  return service({
    url: '/client/maintain/declare/medium/change/construction',
    method: 'post',
    data
  })
}

export const managerListConstruction = (params) => {
  return service({
    url: '/manager/maintain/declare/medium/list/construction',
    method: 'get',
    params
  })
}

export const mediumPlanApproval = (data) => {
  return service({
    url: '/manager/maintain/declare/medium/plan/approval',
    method: 'post',
    data
  })
}

export const frequencyAdd = (data) => {
  return service({
    url: '/manager/maintain/patrol/frequency/add',
    method: 'post',
    data
  })
}

export const frequencyEdit = (data) => {
  return service({
    url: '/manager/maintain/patrol/frequency/edit',
    method: 'post',
    data
  })
}

export const frequencyList = (params) => {
  return service({
    url: '/manager/maintain/patrol/frequency',
    method: 'get',
    params
  })
}

export const frequencyDelete = (id) => {
  return service({
    url: `/manager/maintain/patrol/frequency/delete/${id}`,
    method: 'post',
  })
}

export const frequencyStart = (id) => {
  return service({
    url: `/manager/maintain/patrol/frequency/start/${id}`,
    method: 'post',
  })
}

export const mediumPlanExport = (params) => {
  return service({
    url: '/manager/maintain/declare/medium/plan/export',
    method: 'get',
    params
  })
}

export const checkOptionExport = (params) => {
  return service({
    url: '/manager/maintain/check/option/export',
    method: 'get',
    params
  })
}

export const listConstructionExport = (params) => {
  return service({
    url: '/manager/maintain/declare/medium/list/construction/export',
    method: 'get',
    params
  })
}

export const taskUnitExport = (params) => {
  return service({
    url: '/manager/maintain/patrol/task/unit/export',
    method: 'get',
    params
  })
}

export const declareMediumExport = (params) => {
  return service({
    url: '/manager/maintain/declare/medium/export',
    method: 'get',
    params
  })
}

export const applyForm = (data) => {
  return service({
    url: '/client/maintain/download/apply/form',
    method: 'post',
    data
  })
}

export const taskUnitStart = (data) => {
  return service({
    url: '/client/maintain/patrol/task/unit/start',
    method: 'post',
    data
  })
}

export const applyEdit = (data) => {
  return service({
    url: '/client/maintain/declare/medium/apply/edit',
    method: 'post',
    data
  })
}
